package com.cgwx.commonutils.math;

/**
 * @author GaoWei
 * @Date 2021/8/6 - 10:50
 */
public class VarNode extends TermNode
{
    public VarNode(String name, boolean negate)
    {
        super(name, negate);
    }

    public double eval(VarMap v, FuncMap f)
    {
        double val = v.getValue(this.name);
        if (this.negate) {
            val = -val;
        }
        return val;
    }
}
